<template>
  <el-container ref='container' class="Layout">
    <shop-menu></shop-menu>
    <el-main class="Layout_main">
      <nuxt-child/>
    </el-main>
  </el-container>
</template>

<script>
import { nologin } from "~/middleware/logincheck";
import shopMenu from "~/components/shopMenu"
import {mapMutations} from 'vuex'
export default {
  middleware: nologin,
  components: { shopMenu },
  mounted() {
    // 设置contain的高度
    const height = document.documentElement.clientHeight
    this.$refs.container.$el.style.height = height+'px'
    this.SET_INNER_HEIGHT(height)
  },
  methods: {
    ...mapMutations(['SET_INNER_HEIGHT'])
  }
}
</script>

<style lang="scss" scoped>
.Layout {
  min-height: 100vh;
  min-width:1366px;
  border: 1px solid #eee;
}
.Layout_main {
  padding: 0;
}
</style>
